package com.example.shopdemo.dto;

import com.example.shopdemo.entity.Product;
import com.example.shopdemo.enums.ProductStateEnum;
import lombok.Data;

import java.util.List;

/**
 * @author ：Anitaxiaofeng
 * @description：
 * @create 2018-01-21
 **/
@Data
public class ProductExecution {
    private int state;
    private String stateInfo;
    private int count;
    private Product product;
    private List<Product> productList;
    public ProductExecution(){}

    public ProductExecution(ProductStateEnum productStateEnum){
        this.state = productStateEnum.getKey();
        this.stateInfo = productStateEnum.getValue();
    }

    public ProductExecution(ProductStateEnum productStateEnum,Product product){
        this.state = productStateEnum.getKey();
        this.stateInfo = productStateEnum.getValue();
        this.product = product;
    }

    public ProductExecution(ProductStateEnum productStateEnum,List<Product> productList){
        this.state = productStateEnum.getKey();
        this.stateInfo = productStateEnum.getValue();
        this.productList = productList;
    }


}
